home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb.new / gdb-4.0 / libiberty / configure < prev    next >
Encoding:
Text File  |  1991-08-24  |  19.7 KB  |  715 lines

  1. #!/bin/sh
  2. # Please do not edit this file.  It is generated automatically from
  3. # configure.in and a configure template.
  4. configdirs=
  5.  
  6. #!/bin/sh
  7.  
  8. # Configuration script template
  9. #   Copyright (C) 1988, 1990, 1991 Free Software Foundation, Inc.
  10.  
  11. #This file is part of GNU.
  12.  
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of the License, or
  16. # (at your option) any later version.
  17. # This program is distributed in the hope that it will be useful,
  18. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20. # GNU General Public License for more details.
  21. # You should have received a copy of the GNU General Public License
  22. # along with this program; if not, write to the Free Software
  23. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  24.  
  25. # $Id: configure,v 1.31 1991/08/23 04:50:57 rich Exp $
  26.  
  27. #
  28. # Shell script to create proper links to machine-dependent files in
  29. # preparation for compilation.
  30. #
  31. # If configure succeeds, it leaves its status in config.status.
  32. # If configure fails after disturbing the status quo, 
  33. #     config.status is removed.
  34. #
  35.  
  36. remove=rm
  37. hard_link=ln
  38. symbolic_link='ln -s'
  39.  
  40. #for Test
  41. #remove="echo rm"
  42. #hard_link="echo ln"
  43. #symbolic_link="echo ln -s"
  44.  
  45. progname=$0
  46.  
  47. # clear some things potentially inherited from environment.
  48. ansi=
  49. defaulttargets=
  50. destdir=
  51. fatal=
  52. hostsubdir=
  53. Makefile=Makefile
  54. Makefile_in=Makefile.in
  55. norecurse=
  56. recursing=
  57. removing=
  58. srcdir=
  59. srctrigger=
  60. target=
  61. targets=
  62. commontargets=
  63. targetsubdir=
  64. template=
  65. verbose=
  66.  
  67. for arg in $*;
  68. do
  69.     case ${arg} in
  70.     -ansi | +a*)
  71.         ansi=true
  72.         clib=clib
  73.         ;;
  74.     -destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*)
  75.         destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'`
  76.         ;;
  77.     -languages=* | +languages=* | +language=* | +languag=* \
  78.         | +langua=* | +langu=* | +lang=* | +lan=* | +la=* \
  79.         | +l=*)
  80.         languages="${languages} `echo ${arg} | sed 's/[+-]l[a-z]*=//'`"
  81.         ;;
  82.     -gas | +g*)
  83.         gas=yes
  84.         ;;
  85.     -help | +h*)
  86.         fatal=true
  87.         ;;
  88.     -nfp | +nf*)
  89.         nfp=yes
  90.         ;;
  91.     -norecurse | +no*)
  92.         norecurse=true
  93.         ;;
  94.     -recursing)
  95.         recursing=true
  96.         ;;
  97.     -rm | +r*)
  98.         removing=${arg}
  99.         ;;
  100. #    -srcdir=* | +srcdir=* | +srcdi=* | +srcd=* | +src=* | +sr=* | +s=*)
  101. #        srcdir=`echo ${arg} | sed 's/[+-]s[a-z]*=//'`
  102. #        ;;
  103.     -subdirs | +f* | +su*)
  104.         subdirs=${arg}
  105.         ;;
  106.     -target=* | +target=* | +targe=* | +targ=* | +tar=* | +ta=*)
  107.         if [ -n "${targets}" ] ; then
  108.             subdirs="+subdirs"
  109.         fi
  110.  
  111.         newtargets="${targets} `echo ${arg} | sed 's/[+-]t[a-z]*=//'`"
  112.         targets="${newtargets}"
  113.         ;;
  114.     -template=* | +template=* | +templat=* | +templa=* | +templ=* | +temp=* | +tem=* | +te=*)
  115.         template=`echo ${arg} | sed 's/[+-]template=//'`
  116.         ;;
  117.     -v | -verbose | +v*)
  118.         verbose=${arg}
  119.         ;;
  120.     -* | +*)
  121.         (echo ;
  122.         echo "Unrecognized option: \"${arg}\"". ;
  123.         echo) 1>&2
  124.         fatal=true
  125.         ;;
  126.     *)
  127.         if [ -n "${hosts}" ] ; then
  128.             subdirs="+subdirs"
  129.         fi
  130.  
  131.         newhosts="${hosts} ${arg}"
  132.         hosts=${newhosts}
  133.         ;;
  134.     esac
  135. done
  136.  
  137. if [ -n "${verbose}" ] ; then
  138.     echo `pwd`/configure $*
  139. fi
  140.  
  141. # process host and target only if not rebuilding configure itself or removing.
  142. if [ -z "${template}" -a -z "${removing}" -a -z "${fatal}" ] ; then
  143.     # Complain if an arg is missing
  144.     if [ -z "${hosts}" ] ; then
  145.         (echo ;
  146.         echo "configure: No HOST specified." ;
  147.         echo) 1>&2
  148.         fatal=true
  149.     fi
  150. fi
  151.  
  152. if [ -n "${fatal}" -o "${hosts}" = "help" ] ; then
  153.     (echo "Usage: configure HOST" ;
  154.     echo ;
  155.     echo "Options: [defaults in brackets]" ;
  156.     echo " +ansi        configure w/ANSI library. [no ansi lib]" ;
  157.     echo " +destdir=MYDIR    configure for installation into MYDIR. [/usr/local]" ;
  158.     echo " +subdirs        configure in subdirectories.  [in source directories]" ;
  159.     echo " +lang=LANG    configure to build LANG. [gcc]" ;
  160.     echo " +help        print this message. [normal config]" ;
  161.     echo " +gas        configure the compilers for use with gas. [native as]" ;
  162.     echo " +nfp        configure the compilers default to soft floating point. [hard float]" ;
  163.     echo " +norecurse    configure this directory only. [recurse]" ;
  164.     echo " +rm        remove this configuration. [build a configuration]" ;
  165.     echo " +target=TARGET    configure for TARGET.  [TARGET = HOST]" ;
  166.     echo " +template=TEM    rebuild configure using TEM. [normal config]" ;
  167.     echo ;
  168.     echo "Where HOST and TARGET are something like \"vax\", \"sun3\", \"encore\", etc." ;
  169.     echo "Asking for more than one \"+target\" implies \"+subdirs\".  Any other" ;
  170.     echo "options given will apply to all targets.") 1>&2
  171.  
  172.     if [ -r config.status ] ; then
  173.         cat config.status
  174.     fi
  175.  
  176.     exit 1
  177. fi
  178.  
  179. #### configure.in common parts come in here.
  180. # This file is a shell script fragment that supplies the information
  181. # necessary to tailor a template configure script into the configure
  182. # script appropriate for this directory.  For more information, check
  183. # any existing configure script.
  184.  
  185. configdirs=
  186. srctrigger=getopt1.c
  187. srcname="getopt library"
  188. commontargets=true
  189.  
  190. ## end of common part.
  191.  
  192. # are we rebuilding config itself?
  193. if [ -n "${template}" ] ; then
  194.     if [ ! -r ${template} ] ; then
  195.         echo '***' "Can't find template ${template}." 1>&2
  196.         exit 1
  197.     fi
  198.  
  199. # prep the template
  200.     sed -e '/^#### configure.in common parts come in here.$/,/^## end of common part.$/c\
  201. #### configure.in common parts come in here.\
  202. ## end of common part.' \
  203.     -e '/^#### configure.in per-host parts come in here.$/,/^## end of per-host part.$/c\
  204. #### configure.in per-host parts come in here.\
  205. ## end of per-host part.' \
  206.     -e '/^#### configure.in per-target parts come in here.$/,/^## end of per-target part.$/c\
  207. #### configure.in per-target parts come in here.\
  208. ## end of per-target part.' \
  209.     -e '/^#### configure.in post-target parts come in here.$/,/^## end of post-target part.$/c\
  210. #### configure.in post-target parts come in here.\
  211. ## end of post-target part.' \
  212.     < ${template} > template.new
  213.  
  214.     if [ -r configure.in ] ; then
  215.         if [ -z "`grep '^# per\-host:' configure.in`" ] ; then
  216.             echo '***' `pwd`/configure.in has no "per-host:" line. 1>&2
  217.             exit 1
  218.         fi
  219.  
  220.         if [ -z "`grep '^# per\-target:' configure.in`" ] ; then
  221.             echo '***' `pwd`/configure.in has no "per-target:" line. 1>&2
  222.             exit 1
  223.         fi
  224.  
  225.         # split configure.in into common, per-host, per-target,
  226.         # and post-target parts.  Post-target is optional.
  227.         sed -e '/^# per\-host:/,$d' configure.in > configure.com
  228.         sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' configure.in > configure.hst
  229.         if grep -s '^# post-target:' configure.in ; then
  230.           sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' configure.in > configure.tgt
  231.           sed -e '1,/^# post\-target:/d' configure.in > configure.pos
  232.         else
  233.           sed -e '1,/^# per\-target:/d' configure.in > configure.tgt
  234.           echo >configure.pos
  235.         fi
  236.  
  237.         # and insert them
  238.         sed -e '/^#### configure.in common parts come in here.$/  r configure.com' \
  239.             -e '/^#### configure.in per\-host parts come in here.$/  r configure.hst' \
  240.             -e '/^#### configure.in per\-target parts come in here.$/  r configure.tgt' \
  241.             -e '/^#### configure.in post\-target parts come in here.$/  r configure.pos' \
  242.             template.new > configure.new
  243.  
  244.         rm -f configure.com configure.tgt configure.hst configure.pos
  245.     else
  246.         echo Warning: no configure.in in `pwd`
  247.         cat ${template} >> configure
  248.     fi
  249.  
  250.     chmod a+x configure.new
  251.     rm template.new
  252. #    mv configure configure.old
  253.     mv configure.new configure
  254.  
  255.     if [ -n "${verbose}" ] ; then
  256.         echo Rebuilt configure in `pwd`
  257.     fi
  258.  
  259.     # Now update config.sub from the template directory.
  260.     if echo "$template" | grep -s 'configure$' ; then
  261.         cp `echo "$template" | sed s/configure$/config.sub/` ./config.sub.new
  262.     #    mv config.sub config.sub.old
  263.         mv config.sub.new config.sub
  264.  
  265.         if [ -n "${verbose}" ] ; then
  266.             echo Rebuilt config.sub in `pwd`
  267.         fi
  268.     fi
  269.  
  270.     if [ -z "${norecurse}" ] ; then
  271.         # If template is relative path, make it absolute for recursing.
  272.         if echo "${template}" | grep -s '^/' ; then
  273.            true
  274.         else
  275.            template=`pwd`/${template}
  276.         fi
  277.  
  278.         while [ -n "${configdirs}" ] ; do
  279.             # set configdir to car of configdirs, configdirs to cdr of configdirs
  280.             set ${configdirs}; configdir=$1; shift; configdirs=$*
  281.  
  282.             if [ "`echo ${configdir}.*`" != "${configdir}.*" ] ; then
  283.                 targetspecificdirs=${configdir}.*
  284.             else
  285.                 targetspecificdirs=
  286.             fi
  287.  
  288.             for i in ${configdir} ${targetspecificdirs} ; do
  289.                 if [ -d $i ] ; then
  290.                     if [ -r $i/configure ] ; then
  291.                         (cd $i ;
  292.                             ./configure +template=${template} ${verbose})
  293.                     else
  294.                         echo Warning: No configure script in `pwd`/$i
  295.                     fi
  296.                 else
  297.                     if [ -n "${verbose}" ] ; then
  298.                       echo Warning: directory $i is missing.
  299.                     fi
  300.                 fi
  301.             done
  302.         done
  303.     fi
  304.  
  305.     exit 0
  306. fi
  307.  
  308. # some sanity checks on configure.in
  309. if [ -z "${srctrigger}" ] ; then
  310.     echo Warning: srctrigger not set in configure.in. `pwd` not configured.
  311.     exit 1
  312. fi
  313.  
  314. for host in ${hosts} ; do
  315.     # Default other arg
  316.     if [ -z "${targets}" -o -n "${defaulttargets}" ] ; then
  317.         targets=${host}
  318.         defaulttargets=true
  319.     fi
  320.  
  321.     result=`/bin/sh ./config.sub ${host}`
  322.     host_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  323.     host_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  324.     host_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  325.     host=${host_cpu}-${host_vendor}-${host_os}
  326.     host_makefile_frag=config/hmake-${host}
  327.  
  328. #### configure.in per-host parts come in here.
  329.  
  330. case "${host_os}" in
  331. sysv | dgux)    
  332.     host_makefile_frag=config/hmake-sysv
  333.     ;;
  334. esac
  335.  
  336. ## end of per-host part.
  337.  
  338.     for target in ${targets} ; do
  339.  
  340.         result=`/bin/sh ./config.sub ${target}`
  341.         target_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  342.         target_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  343.         target_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  344.         target=${target_cpu}-${target_vendor}-${target_os}
  345.         target_makefile_frag=config/tmake-${target}
  346.  
  347. #### configure.in per-target parts come in here.
  348.  
  349. ## end of per-target part.
  350.  
  351.         # Temporarily, we support only direct subdir builds.
  352.         hostsubdir=Host-${host}
  353.         targetsubdir=Target-${target}
  354.  
  355.         if [ -n "${removing}" ] ; then
  356.             if [ -n "${subdirs}" ] ; then
  357.                 if [ -d "${hostsubdir}" ] ; then
  358.                     rm -rf ${hostsubdir}/${targetsubdir}
  359.  
  360.                     if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target- | grep -v Target-independent`" ] ; then
  361.                         rm -rf ${hostsubdir}
  362.                     fi
  363.                 else
  364.                     echo Warning: no `pwd`/${hostsubdir} to remove.
  365.                 fi
  366.             else
  367.                 rm -f ${Makefile} config.status ${links}
  368.             fi
  369.         else
  370.             if [ -n "${subdirs}" ] ; then
  371.                 # check for existing status before allowing forced subdirs.
  372.                 if [ -f ${Makefile} ] ; then
  373.                     echo '***' "${Makefile} already exists in source directory.  `pwd` not configured." 1>&2
  374.                     exit 1
  375.                 fi
  376.  
  377.                 if [ ! -d ${hostsubdir} ] ; then mkdir ${hostsubdir} ; fi
  378.                 cd ${hostsubdir}
  379.  
  380.                 if [ ! -d ${targetsubdir} ] ; then
  381.                     if [ -z "${commontargets}" ] ; then
  382.                         mkdir ${targetsubdir}
  383.                     else
  384.                         if [ ! -d Target-independent ] ; then
  385.                             mkdir Target-independent
  386.                         fi
  387.  
  388.                         ${symbolic_link} Target-independent ${targetsubdir}
  389.                     fi # if target independent
  390.                 fi # if no target dir yet
  391.  
  392.                 cd ${targetsubdir}
  393.  
  394.                 srcdir=../..
  395.             else
  396.                 # if not subdir builds, then make sure none exist.
  397.                 if [ -n "`(ls .) 2>&1 | grep Host-`" ] ; then
  398.                     echo '***' "Configured subdirs exist.  `pwd` not configured." 1>&2
  399.                     exit 1
  400.                 fi
  401.             fi
  402.  
  403.             # Find the source files, if location was not specified.
  404.             if [ -z "${srcdir}" ] ; then
  405.                 srcdirdefaulted=1
  406.                 srcdir=.
  407.                 if [ -n "${srctrigger}" -a ! -r ${srctrigger} ] ; then
  408.                     srcdir=..
  409.                 fi
  410.             fi
  411.  
  412.             if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then
  413.                 if [ -z "${srcdirdefaulted}" ] ; then
  414.                     echo '***' "${progname}: Can't find ${srcname} sources in `pwd`/${srcdir}" 1>&2
  415.                 else
  416.                     echo '***' "${progname}: Can't find ${srcname} sources in `pwd`/. or `pwd`/.." 1>&2
  417.                 fi
  418.  
  419.                 echo '***' \(At least ${srctrigger} is missing.\) 1>&2
  420.                 exit 1
  421.             fi
  422.  
  423.             # Set up the list of links to be made.
  424.             # ${links} is the list of link names, and ${files} is the list of names to link to.
  425.  
  426.             # Make the links.
  427.             while [ -n "${files}" ] ; do
  428.                 # set file to car of files, files to cdr of files
  429.                 set ${files}; file=$1; shift; files=$*
  430.                 set ${links}; link=$1; shift; links=$*
  431.  
  432.                 if [ ! -r ${srcdir}/${file} ] ; then
  433.                     echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
  434.                     echo '***' "since the file \"${file}\" does not exist." 1>&2
  435.                     exit 1
  436.                 fi
  437.  
  438.                 ${remove} -f ${link}
  439.                 rm -f config.status
  440.                 # Make a symlink if possible, otherwise try a hard link
  441.                 ${symbolic_link} ${srcdir}/${file} ${link} 2>/dev/null || ${hard_link} ${srcdir}/${file} ${link}
  442.  
  443.                 if [ ! -r ${link} ] ; then
  444.                     echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
  445.                     exit 1
  446.                 fi
  447.  
  448.                 if [ -n "${verbose}" ] ; then
  449.                     echo "Linked \"${link}\" to \"${srcdir}/${file}\"."
  450.                 fi
  451.             done
  452.  
  453.             # Create a .gdbinit file which runs the one in srcdir
  454.             # and tells GDB to look there for source files.
  455.  
  456.             case ${srcdir} in
  457.             .)
  458.                 ;;
  459.             *)
  460.                 echo "dir ." > .gdbinit
  461.                 echo "dir ${srcdir}" >> .gdbinit
  462.                 echo "source ${srcdir}/.gdbinit" >> .gdbinit
  463.                 ;;
  464.             esac
  465.  
  466.             # Install a makefile, and make it set VPATH
  467.             # if necessary so that the sources are found.
  468.             # Also change its value of srcdir.
  469.  
  470.         # FIXME-someday: This business of always writing to .tem and mv back
  471.         # is so that I don't screw things up while developing.  Once this
  472.         # template is stable, these should be optimized. xoxorich.
  473.  
  474.             # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
  475.             if [ "${host}" != "${target}" ] ; then
  476.                 echo "CROSS=-DCROSS_COMPILE" > ${Makefile}
  477.                 echo "ALL=start.encap" >> ${Makefile}
  478.             else
  479.                 echo "ALL=all.internal" > ${Makefile}
  480.             fi
  481.  
  482.             # set target, host, VPATH
  483.             echo "host = ${host}" >> ${Makefile}
  484.             echo "target = ${target}" >> ${Makefile}
  485.  
  486.             if [ -n "${subdirs}" ] ; then
  487.                 echo "subdir = /${hostsubdir}/${targetsubdir}" >> ${Makefile}
  488.             else
  489.                 echo "subdir =" >> ${Makefile}
  490.             fi
  491.  
  492.         #    echo "workdir = `pwd`" >> ${Makefile}
  493.             echo "VPATH = ${srcdir}" >> ${Makefile}
  494.  
  495.             # add "Makefile.in" (or whatever it's called)
  496.             cat ${srcdir}/${Makefile_in} >> ${Makefile}
  497.  
  498.             # Conditionalize the makefile for this host.
  499.             if [ -f ${srcdir}/${host_makefile_frag} ] ; then
  500.                 sed -e "/^####/  r ${srcdir}/${host_makefile_frag}" ${Makefile} > Makefile.tem
  501.                 mv Makefile.tem ${Makefile}
  502.             fi
  503.  
  504.             # Conditionalize the makefile for this target.
  505.             if [ -f ${srcdir}/${target_makefile_frag} ] ; then
  506.                 sed -e "/^####/  r ${srcdir}/${target_makefile_frag}" ${Makefile} > Makefile.tem
  507.                 mv Makefile.tem ${Makefile}
  508.             fi
  509.  
  510.             # set srcdir
  511.             sed "s@^srcdir = \.@srcdir = ${srcdir}@" ${Makefile} > Makefile.tem
  512.             mv Makefile.tem ${Makefile}
  513.  
  514.             # set destdir
  515.             if [ -n "${destdir}" ] ; then
  516.                 sed "s:^destdir =.*$:destdir = ${destdir}:" ${Makefile} > Makefile.tem
  517.                 mv Makefile.tem ${Makefile}
  518.             fi
  519.  
  520.             # reset SUBDIRS
  521.             sed "s:^SUBDIRS =.*$:SUBDIRS = ${configdirs}:" ${Makefile} > Makefile.tem
  522.             mv Makefile.tem ${Makefile}
  523.  
  524.             # reset NONSUBDIRS
  525.             sed "s:^NONSUBDIRS =.*$:NONSUBDIRS = ${noconfigdirs}:" ${Makefile} > Makefile.tem
  526.             mv Makefile.tem ${Makefile}
  527.  
  528.             using=
  529.             if [ -f ${srcdir}/${host_makefile_frag} ] ; then
  530.                 using=" using \"${host_makefile_frag}\""
  531.             fi
  532.  
  533.             if [ -f ${srcdir}/${target_makefile_frag} ] ; then
  534.                 if [ -z "${using}" ] ; then
  535.                     andusing=" using \"${target_makefile_frag}\""
  536.                 else
  537.                     andusing="${using} and \"${target_makefile_frag}\""
  538.                 fi
  539.             else
  540.                 andusing=${using}
  541.             fi
  542.  
  543.             if [ -n "${verbose}" -o -z "${recursing}" ] ; then
  544.                 echo "Created \"${Makefile}\"" in `pwd`${andusing}.
  545.             fi
  546.  
  547. #### configure.in post-target parts come in here.
  548.  
  549. ## end of post-target part.
  550.  
  551.             if [ "${host}" = "${target}" ] ; then
  552.                 echo "Links are now set up for use with a ${target}." \
  553.                     > config.status
  554.         #            | tee ${srcdir}/config.status
  555.             else
  556.                 echo "Links are now set up for host ${host} and target ${target}." \
  557.                     > config.status
  558.         #            | tee ${srcdir}/config.status
  559.             fi
  560.  
  561.             originaldir=`pwd`
  562.             cd ${srcdir}
  563.         fi
  564.  
  565.         # If there are subdirectories, then recurse. 
  566.         if [ -z "${norecurse}" -a -n "${configdirs}" ] ; then 
  567.             for configdir in ${configdirs} ; do
  568.                 if [ -n "${verbose}" ] ; then
  569.                     echo Configuring ${configdir}...
  570.                 fi
  571.  
  572.                 if [ -d ${configdir} ] ; then
  573.                     (cd ${configdir} ;
  574.                         ./configure -recursing ${host} +target=${target} \
  575.                             ${verbose} ${subdirs} ${removing} +destdir=${destdir}) \
  576.                         | sed 's/^/    /'
  577.                 else
  578.                     if [ -n "${verbose}" ] ; then
  579.                         echo Warning: directory \"${configdir}\" is missing.
  580.                     fi
  581.                 fi
  582.             done
  583.         fi
  584.     done # for each target
  585.  
  586.     # Now build a Makefile for this host.
  587.     if [ -n "${subdirs}" -a ! -n "${removing}" ] ; then
  588.         cd ${hostsubdir}
  589.         cat > GNUmakefile << E!O!F
  590. # Makefile generated by configure for host ${host}.
  591.  
  592. ALL := $(shell ls -d Target-*)
  593.  
  594. %:
  595.     $(foreach subdir,$(ALL),$(MAKE) -C $(subdir) \$@ &&) true
  596.  
  597. all:
  598. E!O!F
  599.         cd ..
  600.     fi
  601. done # for each host
  602.  
  603. exit 0
  604.  
  605. #
  606. # $Log: configure,v $
  607. # Revision 1.31  1991/08/23  04:50:57  rich
  608. # Minor config polish.
  609. #
  610. # Revision 1.22  1991/08/23  03:31:43  rich
  611. # Minor polish & config mapping.
  612. #
  613. # Revision 1.30  1991/08/22  07:15:51  rich
  614. # Three part names, etc.
  615. #
  616. # Revision 1.29  1991/08/20  04:56:51  rich
  617. # revisiting error messages
  618. #
  619. # Revision 1.28  1991/08/16  19:22:17  rich
  620. # This is the commontargets change and should be considered
  621. # experimental.
  622. #
  623. # Revision 1.27  1991/08/08  01:14:13  rich
  624. # allow +f to stand in for +subdirs
  625. #
  626. # Revision 1.26  1991/08/07  19:21:32  rich
  627. # +forcesubdirs -> +subdirs
  628. #
  629. # Revision 1.25  1991/08/07  07:05:30  rich
  630. # Added make.
  631. #
  632. # Revision 1.24  1991/08/06  19:26:01  rich
  633. # revised option parsing.
  634. #
  635. # Revision 1.23  1991/08/06  19:12:32  rich
  636. # Host-level GNUmakefiles.
  637. #
  638. # Revision 1.22  1991/07/20  01:22:30  rich
  639. # propogate gdb changes and destdir fix
  640. #
  641. # Revision 1.21  1991/07/20  00:55:20  gnu
  642. # Roll in new configure that handles GDB.  Make sure that the "configure"
  643. # that is checked-in reflects the latest "configure.in", which includes gdb.
  644. #
  645. # Revision 1.9  1991/07/06  04:35:51  gnu
  646. # Fix bug in configure when iterating targets.
  647. # Depend on alldeps.mak, not ${srcdir}/alldeps.mak, so it can be found
  648. # in either spot.
  649. #
  650. # Revision 1.8  1991/07/05  00:04:58  gnu
  651. # Thu Jul  4 14:47:06 1991  John Gilmore  (gnu at cygint.cygnus.com)
  652. #
  653. #         * configure.in, Makefile.in:  Avoid rebuilding "depend" as much.
  654. #         Avoid declaring Makefile dependencies, because GNU Make stupidly
  655. #         tries to update it if we do.
  656. #
  657. #         * coffread.c:  Revise for minor changes to bfd internal coff
  658. #         indexes.
  659. #
  660. #         * configure:  If -template= is given a relative path, make it
  661. #         absolute before recurring in subdirectories.
  662. #
  663. # Revision 1.7  1991/07/04  15:59:46  gnu
  664. # Make gdb work with configure.  Only thing that doesn't work is the -list
  665. # option (as far as I know).
  666. #
  667. # Revision 1.6  1991/06/04  07:28:16  gnu
  668. # Change GDB over to GNU General Public License version 2.
  669. #
  670. # Revision 1.5  1991/05/19  07:26:54  rich
  671. # configure changes and -opcode.h movement.
  672. #
  673. # Revision 1.4  1991/05/19  00:16:45  rich
  674. # Configure for gdb.
  675. #
  676. # Revision 1.10  1991/05/04  00:58:38  rich
  677. # Fix program name bug.
  678. #
  679. # Revision 1.9  1991/05/03  19:14:18  rich
  680. # Changed getopt to libiberty, commented out an aborted attempt at host
  681. # level Makefiles because it caused errors on +rm, add a warning for
  682. # directories expected to be removed on +rm but that don't exist.
  683. #
  684. # Revision 1.8  1991/04/24  16:50:59  rich
  685. # Three staging checkpoint.
  686. #
  687. # Revision 1.7  1991/04/17  01:34:47  rich
  688. # Added getopt for binutils, fixed problem with host dependancies in
  689. # configure.template.
  690. #
  691. # Revision 1.6  1991/04/16  00:18:44  rich
  692. # Now handles multiple hosts and targets.
  693. #
  694. # Revision 1.5  1991/04/15  23:43:44  rich
  695. # Now handles multiple hosts and targets.
  696. #
  697. # Revision 1.4  1991/04/13  02:11:03  rich
  698. # Config cut 3.  We now almost install a29k.
  699. #
  700. # Revision 1.3  1991/04/11  02:41:54  rich
  701. # Cut 2 config.  Subdirs.
  702. #
  703. #
  704. #
  705.  
  706. #
  707. # Local Variables:
  708. # fill-column: 131
  709. # End:
  710. #
  711.  
  712. # end of configure.template
  713.